package com.robot.base.configs

import com.robot.base.R
import com.robot.base.util.AppUtils

interface AppConstants {
    /**
     * value规则： /(module后缀)/(所在类名)
     * 路由 A_ : Activity
     */
    interface Router {
        object Main {
            //首页
            const val A_MAIN = "/app/MainActivity"

            //登陆页面
            const val A_LOGIN = "/app/login/LoginActivity"

            const val A_FORGET_PASSWORD = "/app/login/ForgetPasswordActivity"

            const val A_MY_APPLY = "/app/apply/MyApplyActivity"

            const val A_MY_APPLY_PROFILE = "/app/apply/MyApplyProfileActivity"

            //动态申请
            const val A_TREND_APPLY_PROFILE = "/app/apply/TrendApplyProfileActivity"

            const val A_BASIC_INFO = "/app/login/BasicInfoActivity"

            const val A_SIGN = "/app/login/SignActivity"

            const val A_SIGN_MAP = "/app/login/SignMapActivity"

            const val A_NOTIFY_MESSAGE= "/app/login/NotifyMessageActivity"

            const val A_WAGES= "/app/login/WagesActivity"

            const val A_WAGES_PROFILE= "/app/login/WagesProfileActivity"

            const val A_WEB = "/app/web/WebActivity"

            const val A_BIG_IMG = "/app/main/BigImgActivity"

            //我的审批
            const val A_MY_EXAMINE_LIST = "/app/apply/MyExamineListActivity"
            //我的申请
            const val A_MY_APPLY_LIST = "/app/apply/MyApplyListActivity"

            const val A_ADD_FRIEND = "/app/main/AddFriendActivity"

            //创建群聊
            const val A_MESSAGE_GROUP_CREATE = "/app/main/MessageGroupCreateActivity"

            //加入群聊
            const val A_MESSAGE_GROUP_ADD = "/app/main/MessageGroupAddActivity"
        }
    }

    object BundleKey {
        const val ZDY_FORM_ID = "zdy_form_id"
        const val ID = "id"
        const val TITLE = "title"
        const val TYPE = "type"
        const val WEB_URL = "webUrl"
        const val WEB_SHOW_BACK = "webShowBack"
        const val IMG_URL = "imgUrl"
        const val STATUS = "status"
    }

    object LiveKey {
        const val REFRESH_APPLY = "refreshApply"


        const val REFRESH_ADD_GROUP = "refreshAddGroup"

        const val TO_MAIN_TAB = "toMainTab"
    }

    object BundleValue {

    }

    object SpKey {
        const val APP_SHOW_GUIDE_VIEW = "APP_SHOW_GUIDE_VIEW"
        const val APP_SHOW_GUIDE_VIEW_FOR_USER = "APP_SHOW_GUIDE_VIEW_FOR_USER"
        const val CAL_SHOW_TIME = "CAL_SHOW_TIME"
        const val SEARCH_HISTORY = "SEARCH_HISTORY"
        const val UPDATE_VERSION = "UPDATE_VERSION"
        const val IS_SHOW_UPDATE = "IS_SHOW_UPDATE"
        const val VIP_VIEW = "VIP_VIEW"

        /**
         * 是否同意了启动页展示的隐私协议弹框
         */
        const val APP_SPLASH_AGREEMENT = "APP_SPLASH_AGREEMENT"

        /**
         * 是否点击过首页扫描按钮
         */
        const val HOME_SCAN_CLICK = "home_scan_click"

        /**
         * 上一次进入app的时间
         */
        const val APP_LAST_EXIT_TIME = "app_last_exit_time"

        /**
         * 首页商品请求随机数
         */
        const val HOME_GOODS_RANDOM = "home_goods_random"


        const val PREFERENCE_FILE_NAME = "base"
        const val LOGIN_STATE = "mlstate"
        const val LOGINING = "dlld"
        const val LOGINOUT = "zxld"
        const val NOTLOGIN = "mydld"
        //登陆返回
        const val USERILOGININFO = "userLoginInfo"
        //用户详情
        const val USERINFO = "userInfo"

    }

    object BizKey {
        var HOT_CATE_ID = 9999

        const val ORI_VER = 1
        const val ORI_HORI = 2
        var DIR_APK: String? = null

        //bugly app key
        const val BUGLY_APPKEY = "c143f0716a"
        const val UMENG_APPKEY = "5d5672c84ca3578086000cdd"
        const val UMENG_MSG_SECRET = "a5dd929a10c8682156073e6fd8ce1ea2"
        const val NETEASE_QIYU_APPKEY = "3021f1a85ee22d52317aa7bdec3dd7b1"

        //相关app idwxa0047becc08f5c0a
        const val WX_APP_ID = "wx3e1cf951ceccda7d"
        const val WX_APP_SECRET = "582e59f73f3f59fdea6c65e0d0530073"

        const val WEIBO_APP_ID = "3042698560"
        const val WEIBO_APP_SECRET = "8733fd2d7dece8a76df6938414dc19f9"
        const val WEIBO_REDIRECT_URL = "https://api.weibo.com/oauth2/default.html"
        const val QQ_APP_ID = "101971923"
        const val QQ_APP_SECRET = "e890210755b4e21108ad8b585e443814"

        const val DEFAULT_CHANNEL = "DEFAULT_CHANNEL"

        const val CHANNEL_FCJ_NOTIFICATION = "channel_fcj"
        const val TARGET_INTENT_KEY = "TARGET_INTENT_KEY"
        const val PUSH_INFO_KEY = "PUSH_INFO_KEY"

        const val QQ = "qq"
        const val WX = "wechat"
        const val WEIBO = "weibo"
    }


    enum class ApiErrorType(var code: Int, var message: String) {
        //非业务错误
        INTERNAL_SERVER_ERROR(500, AppUtils.getApp().getString(R.string.base_error_2)),
        BAD_GATEWAY(502, AppUtils.getApp().getString(R.string.base_error_3)),
        NOT_FOUND(404, AppUtils.getApp().getString(R.string.base_error_4)),
        CONNECTION_TIMEOUT(408, AppUtils.getApp().getString(R.string.base_error_5)),
        UNEXPECTED_ERROR(700, AppUtils.getApp().getString(R.string.base_error_1));
    }
}